package com.vegetable.modules.entity.allocation.po;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 分配回款添加PO
 * </p>
 *
 * @author Qoder
 * @since 2025-10-08
 */
@Data
@ApiModel(value="AllocationCollectionAddPO对象", description="分配回款添加PO")
public class AllocationCollectionAddPO {

    @ApiModelProperty(value = "主键ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "单据编号")
    private String docNo;

    @ApiModelProperty(value = "交易流水ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long transactionId;

    @ApiModelProperty(value = "客户ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long customerId;

    @ApiModelProperty(value = "客户名称")
    private String customerName;

    @ApiModelProperty(value = "账户ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long accountId;

    @ApiModelProperty(value = "账户名称")
    private String accountName;

    @ApiModelProperty(value = "总金额")
    private BigDecimal totalAmount;

    @ApiModelProperty(value = "回款完成状态 0未完成，1已完成")
    private Integer collectionCompleteStatus = 0;

    @ApiModelProperty(value = "是否有扣款 0无扣款，1有扣款")
    private Integer hasDeduction = 0;

    @ApiModelProperty(value = "扣款原因")
    private String deductionReason;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "创建者ID")
    private Long createUserId;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "分配回款明细列表")
    private List<AllocationCollectionDetailPO> detailList;

    @ApiModelProperty("交易时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date tradingTime;

    @ApiModelProperty("对方银行名称")
    private String bankName;
    @ApiModelProperty("对方银行卡ID")
    private String bankNo;
}